
import React from 'react'
import BraftEditor from 'braft-editor'
import 'braft-editor/dist/index.css'
export default class Editor extends React.Component {

    state = {
        editorState: BraftEditor.createEditorState(null)
    }

    render () {
        return (
            <BraftEditor value={this.state.editorState} onChange={this.handleChange}/>
        )
    }

    handleChange = (editorState) => {
        this.setState({ editorState })
    }

}
